import request from "@/utils/request";

// 查询优惠券分类关联列表
export function listCouponCategoryRelation(query) {
  return request({
    url: `/marketing/couponSpuCategoryRelation/list/${query.couponId}`,
    method: "get",
    params: query,
  });
}

// 查询优惠券分类关联详细
export function getCouponCategoryRelation(id) {
  return request({
    url: "/marketing/couponSpuCategoryRelation/" + id,
    method: "get",
  });
}

// 新增优惠券分类关联
export function addCouponCategoryRelation(data) {
  return request({
    url: "/marketing/couponSpuCategoryRelation",
    method: "post",
    data: data,
  });
}

// 修改优惠券分类关联
export function updateCouponCategoryRelation(data) {
  return request({
    url: "/marketing/couponSpuCategoryRelation",
    method: "put",
    data: data,
  });
}

// 删除优惠券分类关联
export function delCouponCategoryRelation(id) {
  return request({
    url: "/marketing/couponSpuCategoryRelation/" + id,
    method: "delete",
  });
}
